<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"> 
    <title>设备表-设备管理系统</title>
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">  
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
    <form name="add-form" action="/admin/addDevice">
          <button type="submit" class="btn btn-default">添加设备</button>
    </form>
    <form name="query-form" action="/admin/queryDevice" method="POST">
          <div class="form-group">
            <input input type="text" name="device_name" value="{{ device_name }}" size="10" placeholder="请输入设备名" style="width:120px"></input>
            <button type="submit" class="btn btn-default">搜索</button>
          </div>
    </form>

<table class="table table-bordered">
    <caption>设备表</caption>
    <thead>
        <tr>
            <th>设备名</th>
            <th>运营商</th>
            <th>IMEI</th> 
            <th>操作</th> 
        </tr>
    </thead>
    <tbody>
        {% for device in list %}
        <tr>
            <td>{{ device['device_name'] }}</td>
            <td>{{ device['operator'] }}</td>
            <td>{{ device['imei'] }}</td>
            <td><a href="/admin/modifyDevice?id={{device['id']}}">修改</a><a href="/admin/deleteDevice?id={{device['id']}}">删除</a></td>
        </tr>
        {% endfor %}
    </tbody>
</table>

</body>
</html>
